<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>找最大值</title>
	<script>
		var arr = [1,56,23,6,43,87,3,5,55];
		function theBigger(arr){
			var Bigger=arr[0];
			for(var i=1;i<arr.length;i++){
				if(arr[i]>Bigger){
					Bigger=arr[i];
				}
			}
			return Bigger;
		}
			document.write(theBigger(arr)+"<br><br>");
		function run(arr){
			var x;
			for(x in arr){
				if(arr[x]%2!=0){
					arr[x]=2*arr[x]
				}
			}
			return arr;
		}
		console.log(run(arr));
	</script>
</head>
<body>
	
</body>
</html>